Recording Options

While recording a host macro, you can highlight a region or field with the mouse and right-click on the highlighted area.  A popup menu appears with the following selections. These options are used to add control statements to the current macro during the recording process.

Add FindText. SM.FindText is used to determine if a specified text string is currently displayed on the host screen. It can be used to look for the text in a specific screen location or to search the entire host screen for the text. See Screen Mapping Extensions for details.

Add GetArea.  This command gets the text off the screen in any rectangular area. With the option to trim the result, selecting a column of data from the screen, parsing it and using it is much easier than getting all the data with several SM.GetText commands.

Add GetCursor.  Used to determine where the cursor is currently located on the host screen. See Screen Mapping Extensions for details.

Add GetText. This selection adds SM.GetText which is used to retrieve text from the host screen at the column/row position established by the area highlighted by the mouse. See Screen Mapping Extensions for details.

Add WaitForCursor. This does the same as SM.WaitForText, only with the cursor; i.e., the script waits until the cursor reaches the specified location, before executing the next statement. See Screen Mapping Extensions for details.

Add WaitForCursorMove. This function is also used to time your commands to the host session. With this command, you specify only an amount of time in seconds. If the cursor has changed positions within that time, a True result is returned. Otherwise, it will timeout and return False. See Screen Mapping Extensions for details.

Add WaitForHost. SM.WaitForHost is used to time your commands to a vt220 host session. With it, you can delay sending text or keys to the host session, or retrieving data from the host session until the host has responded to the last command sent. See Screen Mapping Extensions for details.

Add WaitForText. Adds an SM.WaitForText statement to the macro, with the column/row position and the length being established by the area highlighted by the mouse, i.e., the script waits until the text appears at the specified location. See Screen Mapping Extensions for details.

Add WaitForWrite. This function waits for a specified number of seconds for data to be entered at a specific location and returns a True or False. If data was written within the wait time, True is returned. If the number of seconds expires first, False is returned. See Screen Mapping Extensions for details.

Select Current Field. Selects the current input field and records its attributes.